import React, {useState} from "react";

export default function Login(props) {
    const [token, setToken] = useState("");
    return <div>
        <input type={"text"} value={token} onChange={e => setToken(e.target.value)}/>
        <button onClick={() => {
            localStorage.setItem("token", token);
            props.history.push("/center")
        }}>登录
        </button>
    </div>
}